using System;
using System.Linq;
using System.Diagnostics.Contracts;

namespace ReactiveLang
{
    public class ReactiveUnhandledExceptionEventArgs: EventArgs
    {
        public bool IsHandled { get; private set; }
        public void SetHandled()
        {
            IsHandled = true;
        }

        public Exception Exception { get; private set; }

        public ReactiveUnhandledExceptionEventArgs(Exception exception)
        {
            Contract.Requires<ArgumentNullException>(exception != null, "exception");
            Exception = exception;
        }
    }
}